<?php

namespace app\appapi\controller;

use app\data\model\LiveOpinionList;

class Opinion extends BaseController
{
    //提交意见
    public function submitOpinion(){
        $userId = $this->checkTokenReturnUserId();
        $post = $this->request->post();
        if(!isset($post['opinion_info'])) $this->error('缺少参数！');
        LiveOpinionList::mk()->insert(['opinion_info'=>$post['opinion_info'],'user_id'=>$userId]);
        $this->success('提交成功');
    }
}